package ace.cmp.data.methodname.sql.mybatisplus.test.extension;

import com.baomidou.mybatisplus.core.injector.AbstractMethod;
import com.baomidou.mybatisplus.core.injector.AbstractSqlInjector;
import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector;
import com.baomidou.mybatisplus.core.metadata.TableInfo;
import java.util.List;
import lombok.extern.slf4j.Slf4j;

/**
 * @author caspar
 * @date 2023/2/16 14:13
 */
@Slf4j
public class MethodNameToSqlInject extends AbstractSqlInjector {
  private final DefaultSqlInjector defaultSqlInjector;

  public MethodNameToSqlInject(DefaultSqlInjector defaultSqlInjector) {
    this.defaultSqlInjector = defaultSqlInjector;
  }

  @Override
  public List<AbstractMethod> getMethodList(Class<?> mapperClass, TableInfo tableInfo) {
    return this.defaultSqlInjector.getMethodList(mapperClass, tableInfo);
  }
}
